<!-- fckedit -->
<script type="text/javascript" src="<?php echo HttpUtil::baseUrl();?>/fckeditor/fckeditor.js"></script>
<script type='text/javascript'>
window.onload = function(){
	var oFCKeditor =  new FCKeditor('description'); 
	var baseurl = '<?php echo HttpUtil::baseUrl();?>';
	oFCKeditor.BasePath = baseurl+"/fckeditor/";
	oFCKeditor.Height = "400";
	oFCKeditor.Width = "600"; 
	oFCKeditor.ToolbarSet = "Custom"; 
	oFCKeditor.ReplaceTextarea();
}
</script>
<!-- //fckedit -->


<div class='center_form'>
    <div class="center_form_right">
        <div class='center_form_btn_div' onclick='javascript:Inventory.submitProduct("<?php echo HttpUtil::baseUrl();?>/inventory/product");'>
            <div class='center_form_btn_pic'>
                <img src='<?php echo HttpUtil::baseUrl();?>/images/save.gif'/>
            </div><div class='center_form_btn_text'><?php echo $this->translate("saveBtn"); ?></div>
        </div>
        <div class='center_form_btn_div' onclick='javascript:Common.gotoUrl("<?php echo HttpUtil::baseUrl();?>/inventory/product");'>
            <div class='center_form_btn_pic'>
                <img src='<?php echo HttpUtil::baseUrl();?>/images/cancel.gif'/>
            </div><div class='center_form_btn_text'><?php echo $this->translate("cancelBtn"); ?></div>
        </div>
    </div>
</div>
<div class="clear"></div>
<input type="hidden" value="<?php echo $this->translate("errorSelectCategory"); ?>" id="errorSelectCategory" />
<input type="hidden" value="<?php echo $this->translate("errorSelectRoot"); ?>" id="errorSelectRoot" />
<input type="hidden" value="<?php echo $this->translate("errorDefaultItem"); ?>" id="errorDefaultItem" />
<input type="hidden" id="isEmpty" name="isEmpty" value="<?php echo $this->translate("isEmpty"); ?>">
<input type="hidden" id="itemError" name="itemError" value="<?php echo $this->translate("itemError"); ?>">
<input type="hidden" id="unique" name="unique" value="<?php echo $this->translate("unique"); ?>">

<form action="<?php echo $this->form->getAction(); ?>" method="post">
<input type="hidden" name="defaultItemVal" id="defaultItemVal"  value="" />
<input type="hidden" value="<?php echo $this->metadataSetId; ?>" name="metadataSetId" />
<div class="centerbig_form">
      <div class="center_top"><span class="center_top_title"><?php echo $this->translate("addProductTitle"); ?></span></div>
      <div class="right_form_content">
               <div class="centerbig_right">
                   <div class="form_content">
                            <input type="hidden" value="1" name="department" />
                            <?php ZendFormUtil::renderElement($this->form->title); ?>
                            <?php ZendFormUtil::renderElement($this->form->urlTitle,"","http://www." . $this->globalConfig->domain ."/p/<span id='urlTitleMsgLabel'></span>"); ?>
                            <?php ZendFormUtil::renderElement($this->form->seoTitle); ?>
                            <?php ZendFormUtil::renderElement($this->form->seoKeyword); ?>
                            <?php ZendFormUtil::renderElement($this->form->templete); ?>
                            <?php ZendFormUtil::renderElement($this->form->chequeRule); ?>
                            <?php ZendFormUtil::renderElement($this->form->priceRule); ?>
                            <?php ZendFormUtil::renderElement($this->form->shipRule); ?>
                            <?php ZendFormUtil::renderElement($this->form->relatedRule); ?>
                            <?php ZendFormUtil::renderElement($this->form->seoDescription); ?>
                            <!-- related product1 -->
                            <!--
                            <div class="form_line_div">
                                <div class="form_element_label"><?php echo $this->translate("related1"); ?></div>
                                <div class="form_element">
                                    <input id="related1" type="text" value="" name="related1"/>
                                    <span style="cursor:pointer;" onclick="javascript:Inventory.openSearchDialog('<?php echo HttpUtil::baseUrl();?>');">
                                        <img src="<?php echo HttpUtil::baseUrl();?>/images/search.gif"/>
                                    </span>
                                </div>
                            </div>
                            <div class="clear"></div>-->
                            <!-- related product2 -->
                            <!--
                            <div class="form_line_div">
                                <div class="form_element_label"><?php echo $this->translate("related2"); ?></div>
                                <div class="form_element">
                                    <input id="related2" type="text" value="" name="related2"/>
                                </div>
                            </div>
                            <div class="clear"></div>-->
                            <!-- related product3 -->
                            <!--
                            <div class="form_line_div">
                                <div class="form_element_label"><?php echo $this->translate("related3"); ?></div>
                                <div class="form_element">
                                    <input id="related3" type="text" value="" name="related3"/>
                                </div>
                            </div>
                            <div class="clear"></div>-->
                            <!-- related product4 -->
                            <!--
                            <div class="form_line_div">
                                <div class="form_element_label"><?php echo $this->translate("related4"); ?></div>
                                <div class="form_element">
                                    <input id="related4" type="text" value="" name="related4"/>
                                </div>
                            </div>
                            <div class="clear"></div>-->
                            <?php ZendFormUtil::renderElement($this->form->description); ?>
                            <div class="form_line_div">
                                <input type="hidden" name="categoryId" id="categoryId" />
                                <div class="form_element_label">Category</div>
                                <div class="form_element" id="treeboxbox_tree">

                                </div>
                            </div>
                            <div class="clear"></div>
                            <!-- product metadata -->
                            <?php
                                if(!empty($this->productMetadatas)){
                                    foreach($this->productMetadatas as $productMetadata){
                                        $inputType = $productMetadata['input_type'];
                                        $productMetadataId = $productMetadata['id'];
                                        $defaultValue = empty($productMetadata['default_value']) ? "" : trim($productMetadata['default_value']);
                                        $valueRequired = $productMetadata['value_required'];
                                    ?>
                                         <div class="form_line_div">
                                            <div class="form_element_label"><?php echo $productMetadata['title']; ?></div>
                                            <div class="form_element">
                                                <?php
                                                    if($inputType == 1 || $inputType == 5){
                                                        echo "<input type='text' name='pMetadata" . $productMetadataId . "' value='" . $defaultValue ."' />";
                                                    }else if($inputType == 2){
                                                        echo "<textarea cols='40' rows='5' name='pMetadata" . $productMetadataId . "'>" . $defaultValue . "</textarea>";
                                                    }else if($inputType == 3 || $inputType == 6){
                                                        $options = $productMetadata['options'];
                                                        echo "<select name='pMetadata" . $productMetadataId . "'>";
                                                        if($valueRequired != 1){
                                                            echo "<option value=''>". $this->translate("selectLabel") ."</option>";
                                                        }
                                                        foreach($options as $option){
                                                            echo "<option value='". $option["id"] . "'>". $option["title"] ."</option>";
                                                        }
                                                        echo "</select>";
                                                    }else if($inputType == 4){
                                                        $options = $productMetadata['options'];
                                                        foreach($options as $option){
                                                            echo "<input type='checkbox' name='pMetadata". $productMetadataId ."[]' value='". $option["id"] ."' />&nbsp;" . $option["title"] ;
                                                            echo "<br />";
                                                        }                                                        
                                                    }
                                                    echo "<input type='hidden' name='pMetadataId[]' value='". $productMetadataId ."' />";
                                                ?>
                                            </div>
                                        </div>
                                        <div class="clear"></div>
                                    <?php
                                    }
                                }
                            ?>
                            <!-- product metadata -->
                            <div id="initItemBtnDiv" style="margin-left:17px;margin-top:15px;font-size:13px;">
                                Click <input type="button" value="Initialize items" onclick="javascript:Inventory.openAttrDialog();" /> to initialize product items.
                            </div>
                            <div id="attributeTables" class="dbgrid_center_right" style="margin:5px;overflow-x:scroll;">
                                <div style="margin-left:20px;margin-top:5px;">
                                    <div id="itemErrorError" class="form_element_error"></div>
                                </div>
                                <table cellspacing="0" cellpadding="0" style="text-align: left;">
                                    <thead>
                                        <tr>
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("upc"); ?></span>
                                            </td>
                                            <!--
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("sku"); ?></span>
                                            </td>
                                            -->
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("purchasingPrice"); ?></span>
                                            </td>
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("costPrice"); ?></span>
                                            </td>
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("marketingPrice"); ?></span>
                                            </td>                                            
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("listPrice"); ?></span>
                                            </td>
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("salePrice"); ?></span>
                                            </td>
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("weight"); ?></span>
                                            </td>
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("inventory"); ?></span>
                                            </td>
                                            <!--
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("place"); ?></span>
                                            </td>
                                            -->
                                            <!--
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("shippingType"); ?></span>
                                            </td>
                                            -->
                                            <!--
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("freeShippingStatus"); ?></span>
                                            </td>
                                            -->
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("visible"); ?></span>
                                            </td>
                                            <td class="dbgrid_th" style="cursor: default;">
                                                <span><?php echo $this->translate("defaultItem"); ?></span>
                                            </td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td class='dbgrid_td'><span><input type='text' name='upc[]' size='20' class='attribute_input_text' value=''/></span></td>
                                            <!--<td class='dbgrid_td'><span><input type='text' name='sku[]' size='10' class='attribute_input_text' value=''/></span></td>-->
                                            <td class='dbgrid_td'><span><input type='text' name='pPrice[]' size='10' class='attribute_input_text' value=''/></span></td>
                                            <td class='dbgrid_td'><span><input type='text' name='cPrice[]' size='10' class='attribute_input_text' value=''/></span></td>
                                            <td class='dbgrid_td'><span><input type='text' name='mPrice[]' size='10' class='attribute_input_text' value=''/></span></td>
                                            <td class='dbgrid_td'><span><input type='text' name='lPrice[]' size='10' class='attribute_input_text' value=''/></span></td>
                                            <td class='dbgrid_td'><span><input type='text' name='sPrice[]' size='10' class='attribute_input_text' value=''/></span></td>
                                            <td class='dbgrid_td'><span><input type='text' name='weight[]' size='10' class='attribute_input_text' value=''/></span></td>
                                            <td class='dbgrid_td'><span><input type='text' name='inventory[]' size='10' class='attribute_input_text' value=''/></span></td>
                                            <!--
                                            <td class='dbgrid_td'>
                                                <span>
                                                    <select name='place[]'>                                                     
                                                        <option value='2'><?php echo $this->translate("local"); ?></option>
                                                        <option value='1'><?php echo $this->translate("dropList"); ?></option>
                                                    </select>
                                                </span>
                                            </td>
                                            -->
                                            <!--
                                            <td class='dbgrid_td'>
                                                <span>
                                                    <select name='shippingType[]'>
                                                       <option value="1"><?php echo $this->translate("commonShipping"); ?></option>
                                                       <option value="2"><?php echo $this->translate("specialShipping"); ?></option>
                                                       <option value="3"><?php echo $this->translate("noShipping"); ?></option>
                                                    </select>
                                                </span>
                                            </td>
                                            -->
                                            <!--
                                            <td class='dbgrid_td'>
                                                <span>
                                                    <select name='freeShippingStatus[]'>                                        
                                                        <option value='1'><?php echo $this->translate("yesLabel"); ?></option>
                                                        <option value='0'><?php echo $this->translate("noLabel"); ?></option>
                                                    </select>
                                                </span>
                                            </td>
                                            -->
                                            <td class='dbgrid_td'>
                                                <span>
                                                    <select name='visible[]'>
                                                        <option value='1'><?php echo $this->translate("yesLabel"); ?></option>
                                                        <option value='0'><?php echo $this->translate("noLabel"); ?></option>
                                                    </select>
                                                </span>
                                            </td>
                                            <td class='dbgrid_td'>
                                                <span><input type='radio' name='defaultItem' value='1' checked /></span>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                   </div>
               </div>
      </div>
      <div class='clear'></div>
</div>
      <?php
        if(!empty($this->itemMetadatas)){
           foreach($this->itemMetadatas as $itemMetadata){
               $itemMetadataId = $itemMetadata['id'];
               echo "<input type='hidden' name='iMetadataId[]' value='". $itemMetadataId ."' />";
           }
        }
      ?>
</form>

<div style="display:none;background-color:#F6F6F4;" id="addAttrDialog">
    <div>
        <div>
            <input type="button" name="initAttr" value="<?php echo $this->translate("saveBtn"); ?>" onclick="javascript:Inventory.initAttributes();" />
            <input type="button" name="cancel" value="<?php echo $this->translate("cancelBtn"); ?>" onclick="javascript:Inventory.closeAttrDialog();" />
        </div>
        <div class = "form_element_error" id="init_warn_msg" style="display:none;margin:5px;">
            <?php echo $this->translate("initNote"); ?>
        </div>
        <fieldSet>
            <legend><?php echo $this->translate("presetValue"); ?></legend>
            <div style="padding:10px;">
                 <div class='form_line_div'>
                    <div class='form_element_label'><?php echo $this->translate("purchasingPrice"); ?></div>
                    <div class="form_element">
                        <input type="text" name="purchasingPricePreset" id="purchasingPricePreset" value="">
                    </div>
                    <div class='form_element_label'><?php echo $this->translate("weight"); ?></div>
                    <div class="form_element">
                        <input type="text" name="weightPreset" id="weightPreset" value="">
                    </div>
                 </div>
                 <div class='clear'></div>
                 <div class='form_line_div'>
                    <div class='form_element_label'><?php echo $this->translate("costPrice"); ?></div>
                    <div class="form_element">
                        <input type="text" name="costPricePreset" id="costPricePreset" value="">
                    </div>
                    <div class='form_element_label'><?php echo $this->translate("inventory"); ?></div>
                    <div class="form_element">
                        <input type="text" name="inventoryPreset" id="inventoryPreset" value="">
                    </div>
                 </div>
                 <div class='clear'></div>
                 <div class='form_line_div'>
                    <div class='form_element_label'><?php echo $this->translate("marketingPrice"); ?></div>
                    <div class="form_element">
                        <input type="text" name="marketingPricePreset" id="marketingPricePreset" value="">
                    </div>
                 </div>
                 <div class='clear'></div>                 
                 <div class='form_line_div'>
                    <div class='form_element_label'><?php echo $this->translate("listPrice"); ?></div>
                    <div class="form_element">
                        <input type="text" name="listPricePreset" id="listPricePreset" value="">
                    </div>
                 </div>
                 <div class='clear'></div>
                 <div class='form_line_div'>
                    <div class='form_element_label'><?php echo $this->translate("salePrice"); ?></div>
                    <div class="form_element">
                        <input type="text" name="salePricePreset" id="salePricePreset" value="">
                    </div>
                 </div>                 
            </div>
        </fieldSet>
        <?php
            if(!empty($this->itemMetadatas)){
                $i = 1;
                foreach($this->itemMetadatas as $itemMetadata){
        ?>
        <fieldSet>
                <legend><?php echo $itemMetadata['title']; ?></legend>
                <div style="padding:10px;">
                        <div style="float:left;">
                         <!--
                         <div class='form_line_div'>
                            <div class='form_element_label'>Attribute1</div>
                            <div class="form_element">
                                <input type="text" name="attribute1" id="attribute1" value="">
                            </div>
                         </div>
                         <div class='clear'></div>
                         -->
                             <input type="hidden" name="attribute<?php echo $i; ?>" id="attribute<?php echo $i; ?>" value="<?php echo $itemMetadata['title']; ?>">
                             <div class="form_line_div">
                                <div class="form_element_label"><?php echo $itemMetadata['title']; ?></div>
                                <div class="form_element" style="width:180px;">
                                    <?php
                                        $inputType = $itemMetadata['input_type'];
                                        if($inputType == 1 || $inputType == 2 || $inputType == 5){
                                            echo "<input id='valueBox$i' type='text' value='' name='valueBox'/>";
                                        }else if($inputType == 3 || $inputType == 4 || $inputType == 6){
                                            $options = $itemMetadata['options'];
                                            echo "<select name='valueBox$i' id='valueBox$i'>";
                                            $j = 0;
                                            foreach($options as $option){
                                                echo "<option value='". $option["id"] ."' id='valueBox". $i ."Option". $j ."'>" . $option["title"] . "</option>";
                                                $j++;
                                            }
                                            echo "</select>";
                                        }
                                    ?>
                                    
                                </div>
                             </div>
                        </div>
                        <div style="float:left;text-align:right;">
                            <input type="button" name="add" value="<?php echo $this->translate("addBtn"); ?>" onclick="Inventory.addAttributeValue(<?php echo $i;?>);" />
                            <br/>
                            <input type="button" name="remove" value="<?php echo $this->translate("delBtn"); ?>" onclick="Inventory.removeAttributeValue(<?php echo $i;?>);" />
                        </div>
                        <div style="float:left;" >
                             <div class="form_line_div">
                                <div class="form_element">
                                    <select id="valueSelect<?php echo $i;?>" name="value<?php echo $i;?>" multiple size="4" style="width:200px;">

                                    </select>
                                </div>
                             </div>
                        </div>
                        <div class="clear"></div>
                </div>
       </fieldSet>
        <?php
                    $i++;
                }
            }
        ?>
        <!--
        <fieldSet>
                <legend>Attribute 2</legend>
                <div style="padding:10px;">
                    <div style="float:left;">
                         <div class='form_line_div'>
                            <div class='form_element_label'>Attribute2</div>
                            <div class="form_element">
                                <input type="text" name="attribute2" id="attribute2" value="">
                            </div>
                         </div>
                         <div class='clear'></div>
                         <div class="form_line_div">
                             <div class="form_element_label">Value</div>
                                <div class="form_element">
                                    <input id="valueBox2" type="text" value="" name="valueBox"/>
                                </div>
                             </div>
                         </div>
                        <div style="float:left;text-align:right;">
                            <input type="button" name="add" value="Add" onclick="Inventory.addAttributeValue(2);" />
                            <br/>
                            <input type="button" name="remove" value="Remove" onclick="Inventory.removeAttributeValue(2);" />
                        </div>
                        <div style="float:left;" >
                             <div class="form_line_div">
                                <div class="form_element">
                                    <select id="valueSelect2" name="value1" multiple size="4" style="width:200px;">

                                    </select>
                                </div>
                             </div>
                        </div>
                        <div class="clear"></div>
                </div>
       </fieldSet>
        <fieldSet>
                <legend>Attribute 3</legend>
                <div style="padding:10px;">
                    <div style="float:left;">
                         <div class='form_line_div'>
                            <div class='form_element_label'>Attribute3</div>
                            <div class="form_element">
                                <input type="text" name="attribute3" id="attribute3" value="">
                            </div>
                         </div>
                         <div class='clear'></div>
                         <div class="form_line_div">
                             <div class="form_element_label">Value</div>
                                <div class="form_element">
                                    <input id="valueBox3" type="text" value="" name="valueBox"/>
                                </div>
                             </div>
                         </div>
                        <div style="float:left;text-align:right;">
                            <input type="button" name="add" value="Add" onclick="Inventory.addAttributeValue(3);" />
                            <br/>
                            <input type="button" name="remove" value="Remove" onclick="Inventory.removeAttributeValue(3);" />
                        </div>
                        <div style="float:left;" >
                             <div class="form_line_div">
                                <div class="form_element">
                                    <select id="valueSelect3" name="value1" multiple size="4" style="width:200px;">

                                    </select>
                                </div>
                             </div>
                        </div>
                        <div class="clear"></div>
                </div>
       </fieldSet>
        <fieldSet>
                <legend>Attribute 4</legend>
                <div style="padding:10px;">
                    <div style="float:left;">
                         <div class='form_line_div'>
                            <div class='form_element_label'>Attribute4</div>
                            <div class="form_element">
                                <input type="text" name="attribute4" id="attribute4" value="">
                            </div>
                         </div>
                         <div class='clear'></div>
                         <div class="form_line_div">
                             <div class="form_element_label">Value</div>
                                <div class="form_element">
                                    <input id="valueBox4" type="text" value="" name="valueBox"/>
                                </div>
                             </div>
                         </div>
                        <div style="float:left;text-align:right;">
                            <input type="button" name="add" value="Add" onclick="Inventory.addAttributeValue(4);" />
                            <br/>
                            <input type="button" name="remove" value="Remove" onclick="Inventory.removeAttributeValue(4);" />
                        </div>
                        <div style="float:left;" >
                             <div class="form_line_div">
                                <div class="form_element">
                                    <select id="valueSelect4" name="value1" multiple size="4" style="width:200px;">

                                    </select>
                                </div>
                             </div>
                        </div>
                        <div class="clear"></div>
                </div>
       </fieldSet>
        <fieldSet>
                <legend>Attribute 5</legend>
                <div style="padding:10px;">
                    <div style="float:left;">
                         <div class='form_line_div'>
                            <div class='form_element_label'>Attribute5</div>
                            <div class="form_element">
                                <input type="text" name="attribute5" id="attribute5" value="">
                            </div>
                         </div>
                         <div class='clear'></div>
                         <div class="form_line_div">
                             <div class="form_element_label">Value</div>
                                <div class="form_element">
                                    <input id="valueBox5" type="text" value="" name="valueBox"/>
                                </div>
                             </div>
                         </div>
                        <div style="float:left;text-align:right;">
                            <input type="button" name="add" value="Add" onclick="Inventory.addAttributeValue(5);" />
                            <br/>
                            <input type="button" name="remove" value="Remove" onclick="Inventory.removeAttributeValue(5);" />
                        </div>
                        <div style="float:left;" >
                             <div class="form_line_div">
                                <div class="form_element">
                                    <select id="valueSelect5" name="value1" multiple size="4" style="width:200px;">

                                    </select>
                                </div>
                             </div>
                        </div>
                        <div class="clear"></div>
                </div>
       </fieldSet>
        -->
    </div>
</div>

<table style="display:none">
    <tbody>
        <tr id="addNewItemHtml">
                <td class='dbgrid_td'><span>&nbsp;</span></td>
                <td class='dbgrid_td'><span><input type='text' name='upc[]' size='20' class='attribute_input_text' value=''/></span></td>
                <?php
                    if(!empty($this->itemMetadatas)){
                       $i = 0;
                       foreach($this->itemMetadatas as $itemMetadata){
                           $itemMetadataId = $itemMetadata['id'];
                           $inputType = $itemMetadata['input_type'];
                           echo "<td class='dbgrid_td'>";
                           echo "<span>";
                           if($inputType == 1 || $inputType == 2 || $inputType == 5){
                                echo "<input type='text' name='value". $i ."[]' class='attribute_input_text' value='' size='10' />";
                           }else if($inputType == 3 || $inputType == 4 || $inputType == 6){
                                echo "<select name='value". $i ."[]' style='width:85px;' >";
                                foreach($itemMetadata['options'] as $option){
                                    echo "<option value='" . $option['id'] . "'>" . $option['title'] . "</option>";
                                }
                                echo "</select>";
                           }
                           echo "</span>";
                           echo "</td>";
                           $i++;
                       }
                    }
                ?>
                <!--<td class='dbgrid_td'><span><input type='text' name='sku[]' size='10' class='attribute_input_text' value=''/></span></td>-->
                <td class='dbgrid_td'><span><input type='text' name='pPrice[]' size='10' class='attribute_input_text' value=''/></span></td>
                <td class='dbgrid_td'><span><input type='text' name='cPrice[]' size='10' class='attribute_input_text' value=''/></span></td>
                <td class='dbgrid_td'><span><input type='text' name='mPrice[]' size='10' class='attribute_input_text' value=''/></span></td>
                <td class='dbgrid_td'><span><input type='text' name='lPrice[]' size='10' class='attribute_input_text' value=''/></span></td>
                <td class='dbgrid_td'><span><input type='text' name='sPrice[]' size='10' class='attribute_input_text' value=''/></span></td>
                <td class='dbgrid_td'><span><input type='text' name='weight[]' size='10' class='attribute_input_text' value=''/></span></td>
                <td class='dbgrid_td'><span><input type='text' name='inventory[]' size='10' class='attribute_input_text' value=''/></span></td>
                <!--
                <td class='dbgrid_td'>
                    <span>
                        <select name='place[]'>
                            <option value='2'><?php echo $this->translate("local"); ?></option>
                            <option value='1'><?php echo $this->translate("dropList"); ?></option>
                        </select>
                    </span>
                </td>
                -->
                <!--
                <td class='dbgrid_td'>
                    <span>
                        <select name='shippingType[]'>
                           <option value="1"><?php echo $this->translate("commonShipping"); ?></option>
                           <option value="2"><?php echo $this->translate("specialShipping"); ?></option>
                           <option value="3"><?php echo $this->translate("noShipping"); ?></option>
                        </select>
                    </span>
                </td>
                -->
                <!--
                <td class='dbgrid_td'>
                    <span>
                        <select name='freeShippingStatus[]'>
                            <option value='1'><?php echo $this->translate("yesLabel"); ?></option>
                            <option value='0'><?php echo $this->translate("noLabel"); ?></option>
                        </select>
                    </span>
                </td>
                -->
                <td class='dbgrid_td'>
                    <span>
                        <select name='visible[]'>
                            <option value='1'><?php echo $this->translate("yesLabel"); ?></option>
                            <option value='0'><?php echo $this->translate("noLabel"); ?></option>
                        </select>
                    </span>
                </td>
                <td class='dbgrid_td'>
                    <span><input type='radio' name='defaultItem' value='1'/></span>
                </td>
        </tr>
      <tbody>
</table>

<div id="searchDialog"></div>
<script type="text/javascript" language="javascript">
    //<![CDATA[
         var tree;
         $(document).ready(function(){
            var categoryXml = '<?php echo $this->categoryXml ?>';
            var imagePath = "<?php echo HttpUtil::baseUrl();?>/images/dhtmltreeimgs/";
            tree = Inventory.initCategoryTree("treeboxbox_tree",categoryXml,imagePath,1);
            tree.enableCheckBoxes(1);
            tree.enableTreeImages(0);
            tree.enableThreeStateCheckboxes(0);
            tree.openItem("-1");
         });
     //]]>
</script>